package cl.sujey.school;

import java.util.Scanner;

public class EvaluationsAdmin {

	public static void main(String[] args) {

		Evaluation evaluation = loadEvaluation();
		System.out.println("El promerdio es: " + evaluation.average());

	}

	private static Evaluation loadEvaluation() {

		Evaluation evaluation = new Evaluation();

		// TODO: Poner una condicion para que termine.
		int[] numero = new int[2];

		for (int j = 0; j < 2; j++)

		{
			Mark mark = loadMark();
			evaluation.addMark(mark);
		}
		
		return evaluation;
	}

	private static Mark loadMark() {

		Scanner scanner = new Scanner(System.in);

		// Se pide el nombre del estudiante
		System.out.print("Ingrese nombre del alumno: ");
		String name = scanner.next();

		Student student = new Student(name);

		// Se pide la nota del estudiante en una evaluacion
		System.out.print("Ingrese la nota: ");
		double value = scanner.nextDouble();

		Mark theMark = new Mark(student, value);

		return theMark;
	}

}
